import { Button, Form, Input } from "antd";
import { LeftOutlined } from "@ant-design/icons";
import { useNavigate } from "react-router-dom";
import { useLocation } from "react-router-dom";
import OrderProBox from "./product";
import OrderBox from "./order";
import OrderAddressBox from "./address";
import "./index.scss";
const OrderDetail = () => {
  const navigate = useNavigate();
  let location = useLocation();
  const { state } = location;
  return (
    <div className="OrderDetail">
      <Button
        type="primary"
        icon={<LeftOutlined />}
        onClick={() => {
          navigate("/index/orderList");
        }}
      >
        返回
      </Button>
      <p>订单信息</p>
      <OrderBox id={state.orderId}></OrderBox>
      <p>地址信息</p>
      <OrderAddressBox id={state.address_id}></OrderAddressBox>
      <p>商品信息</p>
      <OrderProBox id={state.productID}></OrderProBox>
    </div>
  );
};

export default OrderDetail;
